In many computer systems, it is quite common to represent and convey information to a user through digitial images. These images may take a variety of forms, such as, for example, alpha numeric characters, cartesian graphs, and other pictorial representations. In many applications, the digital images are conveyed to a user on a display device, such as a raster scan video monitor, printer or the like. Typically, the images to be displayed are stored in digital form, manipulated and then displayed
In rendering an image on a cathode ray tube, the coordinants for each pixel of an image being rendered must be calculated, as well as such values as the color, transparency, depth cue, haze and specular and diffuse factors for each such pixel. Rendering a pixel so that it illustrates a characteristic of an object being rendered (i.e. a three-dimensional object) to reflect depth, closeness to the view, reflection from light sources, etc. is known as "shading" the pixel.
Several shading techniques are used for generating smoothly shaded images of surfaces approximated by three dimensional parametric patches or polygons. One such well known technique is Phong shading, which is a desirable shading technique because it gives a fairly realistic rendering of the desired image with a modest computational cost. Most three-dimensional computer-aided design applications give highest priority to interactive performance and therefore often utilize the realism afforded by Phong shading. Another well-known shading technique is called Gouraud shading, which performs linear interpolation of color over the individual polygons being rendered and which is less accurate than Phong shading. Polygon approximations of curved surfaces are used for performance reasons, since most prior art high-speed graphics hardware is built for fast rendering of polygons. A typical bi-cubic patch, for example, may require 100 or more polygons to give a reasonably accurate approximation of the desired patch. Many design applications would be greatly facilitated if smooth, high-speed, curved surface rendering were available.
Accordingly, it is a principal object of the present invention to provide a parametric patch rendering method and apparatus, which uses relatively simple hardware to do Phong shading directly without slowing down the pixel rendering rate.
Another object of the present invention is to provide a method and apparatus for the rendering of images having uniform bivariate surface patches as well as non-uniform rational B-spline surfaces.
Accordingly, in the present invention, bi-cubic functions which approximate the shading parameters are derived and evaluated, by adaptive forward differencing circuits (AFDU) to provide a shaded color at each pixel along a parametric curve. [Note: adaptive forward differencing circuits (AFDU) will later be explained.]The present invention provides an apparatus for accurately and quickly shading vectors and polygons at a much faster rate, and without any appreciable loss in quality, than was heretofore available under prior art methods. [For a more thorough understanding of Phong shading and shading of polygons, vectors, curves and other objects, see: Bui Tuong-Phong, Illumination For Computer-Generated Images, UTEC-CS c-73-129, July 1973; Tom Duff, "Smoothly Shaded Renderings Of Polyhedral Objects On Raster Displays," Computer Graphics, Volume 13, No. 2, Aug. 1979; Steven A. Coon, "Surfaces For Computer-Aided Design Of Space Forms," Project MAC, Massachusetts Institute of Technology, MAC-TR-41, June, 1967; Bishop and Weimer, "Fast Phong Shading," Computer Graphics, Volume 20, No. 4, Aug. 1986; M. Shantz and S-L Lien, "Shading Bicubic Patches," Computer Graphics, Volume 21, No. 4, July, 1987; Sheue-Ling Lien, Michael Shantz and Vaughan Pratt, "Adaptive Forward Differencing For Rendering Curves And Surfaces," Computer Graphics, Volume 21, July, 1987.]